package com.mall.common.entity;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

/**
 * session or shiro用户对象
 * @author tgy
 *
 */
public class ShiroUser implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;				//用户ID
	private String account;     	//登录账号
	private String password;    	//密码
	private String name;	    	//用户名
	private Set<String> roles;		//权限值
	private List<PowerInfo> power;  //权限对象
	
	public ShiroUser() {
		super();
	}
	
	public ShiroUser(Integer id, String name, Set<String> roles) {
		super();
		this.id = id;
		this.name = name;
		this.roles = roles;
	}
	
	public ShiroUser(Integer id, String name, List<PowerInfo> power) {
		super();
		this.id = id;
		this.name = name;
		this.power = power;
	}

	public ShiroUser(Integer id, String account, String name) {
		super();
		this.id = id;
		this.account = account;
		this.name = name;
	}

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Set<String> getRoles() {
		return roles;
	}
	public void setRoles(Set<String> roles) {
		this.roles = roles;
	}

	public List<PowerInfo> getPower() {
		return power;
	}

	public void setPower(List<PowerInfo> power) {
		this.power = power;
	}
}
